{template 'oldheader'}
<link type="text/css" rel="stylesheet" href="../web/resource/components/datetimepicker/bootstrap-datetimepicker.min.css" />
<script type="text/javascript" src="../web/resource/components/datetimepicker/bootstrap-datetimepicker.min.js"></script>
<link rel="stylesheet" href="../addons/dayu_form/template/mobile/concise/wangcheng.css">
 
{if $initCalendar}
<script type="text/javascript">
	$(function(){
		$('.datepicker').each(function(){
			$(this).datetimepicker({
				format: "yyyy-mm-dd",
				minView: "2",
				pickerPosition: "top-right",
				autoclose: true
			});
		});
	});
</script>
{/if}
<style>
label.checkbox{font-size:14px;font-weight:normal}
.input i, .select i{margin-top:32px;}
.select .col-lg-4 i, .col-lg-4 i{margin-top:26px;}
.select .tpl-district-container .col-lg-4{width:33%;float:left;}
.select .tpl-district-container .col-lg-4 i{margin-top:0px;}
.input span{margin-bottom:5px;}
.sky-form .input,
.sky-form .select,
.sky-form .textarea,
.sky-form .radio,
.sky-form .checkbox,
.sky-form .toggle,
.sky-form .button, .sky-form button {
	position: relative;width:100%;
}
header a{position:absolute;top:0;right:0px;float:right;display:inline-block;font-size:12px;border-left:1px solid #af1b10;background-color:#bd3d34;color:#fff;line-height:50px;-webkit-border-radius: 1px;-moz-border-radius: 1px;-o-border-radius: 1px;padding:0px 10px;margin:0;}
</style>

				<header>{$activity['title']}<a href="{php echo $this->createMobileUrl('mydayu_form', array('name' => 'dayu_form', 'weid' => $_W['uniacid'], 'id' => $reid))}"><span><i class="fa fa-stack-exchange"></i> {$mname}{/if}</span></a></header>
		<div class="body body-s">		
			<form action="" method="post" enctype="multipart/form-data" onsubmit="return validate();" id="sky-form" class="sky-form">
				
				<fieldset>
					<section>
						<label class="input"><span>姓名<font style="color:red"> *</font></span>
							<i class="icon-append fa-user"></i>
					<input type="text" name="member" value="{$userinfo['realname']}" placeholder="请输入您的真实姓名"/>
							<b class="tooltip tooltip-bottom-right">请输入您的真实姓名</b>
						</label>
					</section>
					<section>
						<label class="input"><span>手机<font style="color:red"> *</font></span>
							<i class="icon-append fa-tablet"></i>
							<input type="text" name="mobile" value="{$userinfo['mobile']}" placeholder="请输入您的手机号码"/>
							<b class="tooltip tooltip-bottom-right">请输入您的手机号码</b>
						</label>
					</section>
				</fieldset>
					
				<fieldset>
				{loop $ds $row}

						{if !empty($row['description'])}
						<div class="tdd">{php echo urldecode($row['description']);}</div>
						{/if}
				
				{if $row['type'] == 'text'}
					<section>
						<label class="input"><span>{$row['title']}{if $row['essential']==1}<font style="color:red"> *</font>{/if}</span>
							<i class="icon-append fa-list-alt"></i>
							<input type="text" name="field_{$row['refid']}_{$row['bind']}" value="{$row['default']}" placeholder="{$row['title']}"/>
							<b class="tooltip tooltip-bottom-right">请输入{$row['title']}</b>
						</label>
					</section>
				{/if}
						{if $row['type'] == 'email'}
					<section>
						<label class="input"><span>{$row['title']}{if $row['essential']==1}<font style="color:red"> *</font>{/if}</span>
							<i class="icon-append fa-envelope-o"></i>
							<input type="text" name="field_{$row['refid']}_{$row['bind']}" value="{if $row['default']}{$row['default']}{else}@{/if}" placeholder="{$row['title']}"/>
							<b class="tooltip tooltip-bottom-right">请输入{$row['title']}</b>
						</label>
					</section>
						{/if}
				{if $row['type'] == 'number'}
					<section>
						<label class="input"><span>{$row['title']}{if $row['essential']==1}<font style="color:red"> *</font>{/if}</span>
							<i class="icon-append fa-list-alt"></i>
							<input type="text" name="field_{$row['refid']}_{$row['bind']}" value="{$row['default']}" placeholder="{$row['title']}"/>
							<b class="tooltip tooltip-bottom-right">请输入{$row['title']}</b>
						</label>
					</section>
				</fieldset>
					
				<fieldset>
				{/if}
						{if $row['type'] == 'textarea'}
					<section>
						<label class="textarea"><span>{$row['title']}{if $row['essential']==1}<font style="color:red"> *</font>{/if}</span>
						<textarea name="field_{$row['refid']}_{$row['bind']}" rows="5" placeholder="{$row['title']}"/>{$row['default']}</textarea>
						</label>
					</section>
						{/if}
				
						{if $row['type'] == 'radio'}
					<section>
						<label class="select col-lg-4"><span>{$row['title']}{if $row['essential']==1}<font style="color:red"> *</font>{/if}</span>
							<select name="field_{$row['refid']}_{$row['bind']}">
						{loop $row['options'] $v}
							<option value="{$v}" {if $v == $row['default']} selected="selected"{/if}>{$v}</option>
						{/loop}
							</select>
							<i></i>
						</label>
					</section>
						{/if}

						{if $row['type'] == 'image'}						
					<section>
						<label class="input-file"><span>{$row['title']}{if $row['essential']==1}<font style="color:red"> *</font>{/if}</span>
							{php echo tpl_form_field_image('field_' . $row['refid'] . '_' . $row['bind'], '');}
						</label>
					</section>
						{/if}						
				
						{if $row['type'] == 'checkbox'}
						<section><span>{$row['title']}</span>
						{loop $row['options'] $v}
						<label class="checkbox">
							<input type="checkbox" name="field_{$row['refid']}_{$row['bind']}[]" value="{$v}" {if $v == $row['default']} checked="checked"{/if}/><i></i>{$v}
						</label>
						{/loop}
						</section>
						{/if}
						
						{if $row['type'] == 'select'}
					<section>
						<label class="select col-lg-4"><span>{$row['title']}{if $row['essential']==1}<font style="color:red"> *</font>{/if}</span>
							<select name="field_{$row['refid']}_{$row['bind']}">
						{loop $row['options'] $v}
							<option value="{$v}" {if $v == $row['default']} selected="selected"{/if} />{$v}</option>
						{/loop}
							</select>
							<i></i>
						</label>
					</section>
						{/if}
						
						
						{if $row['type'] == 'calendar'}
					<section>
						<label class="select col-lg-4"><span>{$row['title']}{if $row['essential']==1}<font style="color:red"> *</font>{/if}</span>
							<i class="icon-append fa fa-calendar"></i>
							{php echo tpl_form_field_date('field_' . $row['refid'] . '_' . $row['bind']);}
							<b class="tooltip tooltip-bottom-right">请输入{$row['title']}</b>
						</label>
					</section>
						{/if}

						{if $row['type'] == 'range'}
					<section>
						<label class="select col-lg-4"><span>{$row['title']}{if $row['essential']==1}<font style="color:red"> *</font>{/if}</span>
							<select name="field_{$row['refid']}_{$row['bind']}">
							<option value="0:00-1:00" >0:00-1:00</option>
							<option value="1:00-2:00">1:00-2:00</option>
							<option value="2:00-3:00">2:00-3:00</option>
							<option value="3:00-4:00">3:00-4:00</option>
							<option value="4:00-5:00">4:00-5:00</option>
							<option value="5:00-6:00">5:00-6:00</option>
							<option value="6:00-7:00">6:00-7:00</option>
							<option value="7:00-8:00">7:00-8:00</option>
							<option value="8:00-9:00">8:00-9:00</option>
							<option value="9:00-10:00">9:00-10:00</option>
							<option value="10:00-11:00">10:00-11:00</option>
							<option value="11:00-12:00">11:00-12:00</option>
							<option value="12:00-13:00">12:00-13:00</option>
							<option value="13:00-14:00">13:00-14:00</option>
							<option value="14:00-15:00">14:00-15:00</option>
							<option value="15:00-16:00">15:00-16:00</option>
							<option value="16:00-17:00">16:00-17:00</option>
							<option value="17:00-18:00">17:00-18:00</option>
							<option value="18:00-19:00">18:00-19:00</option>
							<option value="19:00-20:00">19:00-20:00</option>
							<option value="20:00-21:00">20:00-21:00</option>
							<option value="21:00-22:00">21:00-22:00</option>
							<option value="22:00-23:00">22:00-23:00</option>
							<option value="23:00-24:00">23:00-24:00</option>
							</select>
							<i></i>
						</label>
					</section>
						{/if}
						
						{if $row['type'] == 'reside'}
					<section>
						<div class="select">
						{php echo dayu_fans_form('reside',array('province' => $profile['resideprovince'],'city' => $profile['residecity'],'district' => $profile['residedist']));}
						</div>
					</section>
						{/if}
				
				{/loop}
				</fieldset>
				<footer>
		<input type="hidden" name="token" value="{$_W['token']}" />
		<input type="submit" class="button" value="提 交" name="submit" style="width:100%;">
				</footer>
			</form>			
		</div>		
{template 'script'}
{template 'footer'}